class VenueItem {
  late String id;
  late String name;
  late String address;
  late String cover;
  late String detail;
  late double long;
  late double lat;
  late String code;
  VenueItem(Map<String, dynamic> json) {
    id = "${json["id"]}";
    try {
      long = double.parse("${json["long"]}");
    } catch (e) {
      long = 0;
    }
    try {
      lat = double.parse("${json["lat"]}");
    } catch (e) {
      lat = 0;
    }
    name = "${json["name"]}";
    address = "${json["address"]}";
    detail = "${json["detail"]}";
    cover = "${json["cover"]}";
    try {
      code = json["code"] as String;
    } catch (e) {
      code = '';
    }
  }

  Map<String, dynamic> get json {
    return Map<String, dynamic>()
      ..["id"] = id
      ..["long"] = long
      ..["lat"] = lat
      ..["name"] = name
      ..["address"] = address
      ..["detail"] = detail
      ..["cover"] = cover
      ..["code"] = code;
  }
}
